name: Docker Image CI

on:
  pull_request:
    branches: [ master ]

jobs:
  docker:
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v3

      - name: Build the base image
        run: docker build ./base --tag hadoop-hive-spark-base

      - name: Build the master image
        run: docker build ./master --tag hadoop-hive-spark-master --pull=false

      - name: Build the worker image
        run: docker build ./worker --tag hadoop-hive-spark-worker --pull=false

      - name: Build the history image
        run: docker build ./history --tag hadoop-hive-spark-history --pull=false

      - name: Build the jupyter image
        run: docker build ./jupyter --tag hadoop-hive-spark-jupyter --pull=false
